<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3"/>
<title>Duye SDK User Wizard: duye::System Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Duye SDK User Wizard
   &#160;<span id="projectnumber">V1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>duye</b></li><li class="navelem"><a class="el" href="classduye_1_1_system.html">System</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classduye_1_1_system-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">duye::System Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a34a0c177baf9520260cf855b2efca320"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_system.html#a34a0c177baf9520260cf855b2efca320">sleep</a> (const uint64 &amp;time)</td></tr>
<tr class="memdesc:a34a0c177baf9520260cf855b2efca320"><td class="mdescLeft">&#160;</td><td class="mdescRight">sleep  <a href="#a34a0c177baf9520260cf855b2efca320"></a><br/></td></tr>
<tr class="separator:a34a0c177baf9520260cf855b2efca320"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56336951deb64c0dd577fdc301fd569a"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_system.html#a56336951deb64c0dd577fdc301fd569a">msleep</a> (const uint64 &amp;time)</td></tr>
<tr class="memdesc:a56336951deb64c0dd577fdc301fd569a"><td class="mdescLeft">&#160;</td><td class="mdescRight">usleep  <a href="#a56336951deb64c0dd577fdc301fd569a"></a><br/></td></tr>
<tr class="separator:a56336951deb64c0dd577fdc301fd569a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae86ab2172d0e2ac3320ac576f4424b6d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_system.html#ae86ab2172d0e2ac3320ac576f4424b6d">usleep</a> (const uint64 &amp;time)</td></tr>
<tr class="memdesc:ae86ab2172d0e2ac3320ac576f4424b6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">usleep  <a href="#ae86ab2172d0e2ac3320ac576f4424b6d"></a><br/></td></tr>
<tr class="separator:ae86ab2172d0e2ac3320ac576f4424b6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae84745d111fd169d7d6befe9143d8062"><td class="memItemLeft" align="right" valign="top">static int64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_system.html#ae84745d111fd169d7d6befe9143d8062">pformat</a> (int8 *buffer, const uint64 size, const int8 *args,...)</td></tr>
<tr class="memdesc:ae84745d111fd169d7d6befe9143d8062"><td class="mdescLeft">&#160;</td><td class="mdescRight">format  <a href="#ae84745d111fd169d7d6befe9143d8062"></a><br/></td></tr>
<tr class="separator:ae84745d111fd169d7d6befe9143d8062"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade33f02d88f61f508301d265d6690c54"><td class="memItemLeft" align="right" valign="top">static int32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_system.html#ade33f02d88f61f508301d265d6690c54">shell</a> (const int8 *cmd, int8 *result, const uint32 result_size)</td></tr>
<tr class="memdesc:ade33f02d88f61f508301d265d6690c54"><td class="mdescLeft">&#160;</td><td class="mdescRight">execute shell command  <a href="#ade33f02d88f61f508301d265d6690c54"></a><br/></td></tr>
<tr class="separator:ade33f02d88f61f508301d265d6690c54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5fbd814b0c5c30f2904253a56e060ef2"><td class="memItemLeft" align="right" valign="top">static int32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_system.html#a5fbd814b0c5c30f2904253a56e060ef2">shell</a> (const int8 *cmd,...)</td></tr>
<tr class="memdesc:a5fbd814b0c5c30f2904253a56e060ef2"><td class="mdescLeft">&#160;</td><td class="mdescRight">execute shell command  <a href="#a5fbd814b0c5c30f2904253a56e060ef2"></a><br/></td></tr>
<tr class="separator:a5fbd814b0c5c30f2904253a56e060ef2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2daa2b5ce18cb47141b0d15743cd2e77"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2daa2b5ce18cb47141b0d15743cd2e77"></a>
static int32&#160;</td><td class="memItemRight" valign="bottom"><b>shell</b> (const uint32 cmd_len, const int8 *cmd,...)</td></tr>
<tr class="separator:a2daa2b5ce18cb47141b0d15743cd2e77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fd304957c39052dcabe01a5559a08df"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8fd304957c39052dcabe01a5559a08df"></a>
static int32&#160;</td><td class="memItemRight" valign="bottom"><b>shell</b> (std::string &amp;result, const int8 *cmd,...)</td></tr>
<tr class="separator:a8fd304957c39052dcabe01a5559a08df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba465a38cf0615bd2f6cc36b7275c4be"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aba465a38cf0615bd2f6cc36b7275c4be"></a>
static int32&#160;</td><td class="memItemRight" valign="bottom"><b>shell</b> (const uint32 cmd_len, std::string &amp;result, const int8 *cmd,...)</td></tr>
<tr class="separator:aba465a38cf0615bd2f6cc36b7275c4be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afce55eb8a1a5161f39650c37400d737e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afce55eb8a1a5161f39650c37400d737e"></a>
static int32&#160;</td><td class="memItemRight" valign="bottom"><b>shell</b> (const uint32 cmd_len, int8 *result, const uint32 result_size, const int8 *cmd,...)</td></tr>
<tr class="separator:afce55eb8a1a5161f39650c37400d737e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5cfffdc8f55b93cd90dcea184f4fa73c"><td class="memItemLeft" align="right" valign="top">static uint64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_system.html#a5cfffdc8f55b93cd90dcea184f4fa73c">sysTime</a> ()</td></tr>
<tr class="memdesc:a5cfffdc8f55b93cd90dcea184f4fa73c"><td class="mdescLeft">&#160;</td><td class="mdescRight">get system time  <a href="#a5cfffdc8f55b93cd90dcea184f4fa73c"></a><br/></td></tr>
<tr class="separator:a5cfffdc8f55b93cd90dcea184f4fa73c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c3cea2a5f53d80af2d5be0d96634e1e"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_system.html#a9c3cea2a5f53d80af2d5be0d96634e1e">optArg</a> (int32 argc, int8 **argv, int8 *cmd, int64 &amp;value)</td></tr>
<tr class="memdesc:a9c3cea2a5f53d80af2d5be0d96634e1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">get options  <a href="#a9c3cea2a5f53d80af2d5be0d96634e1e"></a><br/></td></tr>
<tr class="separator:a9c3cea2a5f53d80af2d5be0d96634e1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24ddbb3c5ef52e0e15088f76b12d1bbf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a24ddbb3c5ef52e0e15088f76b12d1bbf"></a>
static bool&#160;</td><td class="memItemRight" valign="bottom"><b>optArg</b> (int32 argc, int8 **argv, int8 *cmd, uint64 &amp;value)</td></tr>
<tr class="separator:a24ddbb3c5ef52e0e15088f76b12d1bbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6a4be23753262aaca0a2c28663a6ef6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad6a4be23753262aaca0a2c28663a6ef6"></a>
static bool&#160;</td><td class="memItemRight" valign="bottom"><b>optArg</b> (int32 argc, int8 **argv, int8 *cmd, std::string &amp;value)</td></tr>
<tr class="separator:ad6a4be23753262aaca0a2c28663a6ef6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2bf2b10079ceb4a379f08d4ca69b1dac"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2bf2b10079ceb4a379f08d4ca69b1dac"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_system.html#a2bf2b10079ceb4a379f08d4ca69b1dac">daemonize</a> ()</td></tr>
<tr class="memdesc:a2bf2b10079ceb4a379f08d4ca69b1dac"><td class="mdescLeft">&#160;</td><td class="mdescRight">create daemon process <br/></td></tr>
<tr class="separator:a2bf2b10079ceb4a379f08d4ca69b1dac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad951d255082cdd895661295fe5fe485b"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_system.html#ad951d255082cdd895661295fe5fe485b">limitCpu</a> (const char *process_name, const uint16 cpu_percent)</td></tr>
<tr class="memdesc:ad951d255082cdd895661295fe5fe485b"><td class="mdescLeft">&#160;</td><td class="mdescRight">limit process CPU resource usage  <a href="#ad951d255082cdd895661295fe5fe485b"></a><br/></td></tr>
<tr class="separator:ad951d255082cdd895661295fe5fe485b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acdcfcee85cd31b4a304f5a4b0f4a942d"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_system.html#acdcfcee85cd31b4a304f5a4b0f4a942d">getIPAddrByDevName</a> (const std::string &amp;phyCardName, std::string &amp;ipAddr)</td></tr>
<tr class="memdesc:acdcfcee85cd31b4a304f5a4b0f4a942d"><td class="mdescLeft">&#160;</td><td class="mdescRight">get ip address by physical network card name  <a href="#acdcfcee85cd31b4a304f5a4b0f4a942d"></a><br/></td></tr>
<tr class="separator:acdcfcee85cd31b4a304f5a4b0f4a942d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a824e5cb2140bfacab490ca4ce6f507d9"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_system.html#a824e5cb2140bfacab490ca4ce6f507d9">getFirstValidIPAddr</a> (std::string &amp;ipAddr)</td></tr>
<tr class="memdesc:a824e5cb2140bfacab490ca4ce6f507d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">get first valid ip address  <a href="#a824e5cb2140bfacab490ca4ce6f507d9"></a><br/></td></tr>
<tr class="separator:a824e5cb2140bfacab490ca4ce6f507d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0e93f80d358761e4d27665f4a919012"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_system.html#ad0e93f80d358761e4d27665f4a919012">getNetworkCards</a> (std::map&lt; std::string, std::string &gt; &amp;networkCards)</td></tr>
<tr class="memdesc:ad0e93f80d358761e4d27665f4a919012"><td class="mdescLeft">&#160;</td><td class="mdescRight">get first valid ip address  <a href="#ad0e93f80d358761e4d27665f4a919012"></a><br/></td></tr>
<tr class="separator:ad0e93f80d358761e4d27665f4a919012"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac54f9077e03b9de605e0ab8262cb59ee"><td class="memItemLeft" align="right" valign="top">static uint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_system.html#ac54f9077e03b9de605e0ab8262cb59ee">getPid</a> ()</td></tr>
<tr class="memdesc:ac54f9077e03b9de605e0ab8262cb59ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">get process id  <a href="#ac54f9077e03b9de605e0ab8262cb59ee"></a><br/></td></tr>
<tr class="separator:ac54f9077e03b9de605e0ab8262cb59ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a112533aa2a23327bd618f85ef344db13"><td class="memItemLeft" align="right" valign="top">static uint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_system.html#a112533aa2a23327bd618f85ef344db13">getPPid</a> ()</td></tr>
<tr class="memdesc:a112533aa2a23327bd618f85ef344db13"><td class="mdescLeft">&#160;</td><td class="mdescRight">get parent process id  <a href="#a112533aa2a23327bd618f85ef344db13"></a><br/></td></tr>
<tr class="separator:a112533aa2a23327bd618f85ef344db13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f14e6cba9ea13261c1ce55a56810147"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_system.html#a9f14e6cba9ea13261c1ce55a56810147">getSysInfo</a> (std::string &amp;name, std::string &amp;version)</td></tr>
<tr class="memdesc:a9f14e6cba9ea13261c1ce55a56810147"><td class="mdescLeft">&#160;</td><td class="mdescRight">get system type and version  <a href="#a9f14e6cba9ea13261c1ce55a56810147"></a><br/></td></tr>
<tr class="separator:a9f14e6cba9ea13261c1ce55a56810147"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a851da139fe28a68d35ba3e9d86a3beaa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a851da139fe28a68d35ba3e9d86a3beaa"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_system.html#a851da139fe28a68d35ba3e9d86a3beaa">manMalloc</a> ()</td></tr>
<tr class="memdesc:a851da139fe28a68d35ba3e9d86a3beaa"><td class="mdescLeft">&#160;</td><td class="mdescRight">manual free system memory fragmentation <br/></td></tr>
<tr class="separator:a851da139fe28a68d35ba3e9d86a3beaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a824e5cb2140bfacab490ca4ce6f507d9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool duye::System::getFirstValidIPAddr </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>ipAddr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get first valid ip address </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">ipAddr</td><td>: ip address </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true/false </dd></dl>

</div>
</div>
<a class="anchor" id="acdcfcee85cd31b4a304f5a4b0f4a942d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool duye::System::getIPAddrByDevName </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>phyCardName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>ipAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get ip address by physical network card name </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">phyCardName</td><td>: physical network card name </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">ipAddr</td><td>: ip address </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true/false </dd></dl>

</div>
</div>
<a class="anchor" id="ad0e93f80d358761e4d27665f4a919012"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool duye::System::getNetworkCards </td>
          <td>(</td>
          <td class="paramtype">std::map&lt; std::string, std::string &gt; &amp;&#160;</td>
          <td class="paramname"><em>networkCards</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get first valid ip address </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">networkCards</td><td>: &lt;network_card_name, ip_address&gt; </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true/false </dd></dl>

</div>
</div>
<a class="anchor" id="ac54f9077e03b9de605e0ab8262cb59ee"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32 duye::System::getPid </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get process id </p>
<dl class="section return"><dt>Returns</dt><dd>process id </dd></dl>

</div>
</div>
<a class="anchor" id="a112533aa2a23327bd618f85ef344db13"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32 duye::System::getPPid </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get parent process id </p>
<dl class="section return"><dt>Returns</dt><dd>process id </dd></dl>

</div>
</div>
<a class="anchor" id="a9f14e6cba9ea13261c1ce55a56810147"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool duye::System::getSysInfo </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>version</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get system type and version </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">name</td><td>: system type, content : ubuntu, centos, fedora, rhel, suse, asianux, debian, oraclelinux </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">version</td><td>: system version </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>false/true </dd></dl>

</div>
</div>
<a class="anchor" id="ad951d255082cdd895661295fe5fe485b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool duye::System::limitCpu </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>process_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16&#160;</td>
          <td class="paramname"><em>cpu_percent</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>limit process CPU resource usage </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">process_name</td><td>: process name </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cpu_percent</td><td>: CPU limit percent </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true/false </dd></dl>

</div>
</div>
<a class="anchor" id="a56336951deb64c0dd577fdc301fd569a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void duye::System::msleep </td>
          <td>(</td>
          <td class="paramtype">const uint64 &amp;&#160;</td>
          <td class="paramname"><em>time</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>usleep </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">time</td><td>: millisecond </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9c3cea2a5f53d80af2d5be0d96634e1e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool duye::System::optArg </td>
          <td>(</td>
          <td class="paramtype">int32&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8 **&#160;</td>
          <td class="paramname"><em>argv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8 *&#160;</td>
          <td class="paramname"><em>cmd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64 &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get options </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">argc</td><td>: argument count </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">argv</td><td>: argument list </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cmd</td><td>: need parser command </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">value</td><td>: out value </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true/false </dd></dl>

</div>
</div>
<a class="anchor" id="ae84745d111fd169d7d6befe9143d8062"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int64 duye::System::pformat </td>
          <td>(</td>
          <td class="paramtype">int8 *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint64&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int8 *&#160;</td>
          <td class="paramname"><em>args</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>format </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">buffer</td><td>: out buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>: out buffer size </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">args</td><td>: parameters </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>string size, error : -1 </dd></dl>

</div>
</div>
<a class="anchor" id="ade33f02d88f61f508301d265d6690c54"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int32 duye::System::shell </td>
          <td>(</td>
          <td class="paramtype">const int8 *&#160;</td>
          <td class="paramname"><em>cmd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8 *&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint32&#160;</td>
          <td class="paramname"><em>result_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>execute shell command </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cmd</td><td>: shell command </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>: output buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">result_size</td><td>: output buffer size </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>: On success, return the number of read bytes. The number equals to zero when shell execute print empty. or -1 if an error occurred. </dd></dl>

</div>
</div>
<a class="anchor" id="a5fbd814b0c5c30f2904253a56e060ef2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int32 duye::System::shell </td>
          <td>(</td>
          <td class="paramtype">const int8 *&#160;</td>
          <td class="paramname"><em>cmd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>execute shell command </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">cmd_len</td><td>: command length </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>: output buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">result_size</td><td>: output buffer size </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cmd</td><td>: cmd </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>: On success, return the number of read bytes. The number equals to zero when shell execute print empty. or -1 if an error occurred. </dd></dl>

</div>
</div>
<a class="anchor" id="a34a0c177baf9520260cf855b2efca320"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void duye::System::sleep </td>
          <td>(</td>
          <td class="paramtype">const uint64 &amp;&#160;</td>
          <td class="paramname"><em>time</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>sleep </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">time</td><td>: second </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a5cfffdc8f55b93cd90dcea184f4fa73c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint64 duye::System::sysTime </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get system time </p>
<dl class="section return"><dt>Returns</dt><dd>time(microsecond) </dd></dl>

</div>
</div>
<a class="anchor" id="ae86ab2172d0e2ac3320ac576f4424b6d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void duye::System::usleep </td>
          <td>(</td>
          <td class="paramtype">const uint64 &amp;&#160;</td>
          <td class="paramname"><em>time</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>usleep </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">time</td><td>: microsecond </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>Z:/duye/src/duyebase/system/<a class="el" href="duye__sys_8h_source.html">duye_sys.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Feb 27 2017 15:19:20 for Duye SDK User Wizard by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3
</small></address>
</body>
</html>
